<script lang="ts" setup>
import { reactive } from 'vue'
const formList = reactive<FormList>([
  {
    label: '远程搜索',
    prop: 'select4',
    type: 'select',
    data: [],
    multiple: true,
    value: [1],
    rule: [{ required: true, trigger: 'blur' }],
    filterMethod: ({ value, c }) => {
      if (!value) return
      c.loading = true
      setTimeout(() => {
        c.loading = false
        c.data = [
          { label: '远程选项1', value: 1 },
          { label: '远程选项2', value: 2 },
          { label: '远程选项3', value: 3 },
          { label: '远程选项4', value: 4 },
          { label: '远程选项5', value: 5 }
        ]
      }, 2000)
    }
  }
])
const submitForm = (formData: any) => {
  console.log(formData)
}
</script>
<template>
  <XyAddForm isCard :formList="formList" @submit-form="submitForm" />
</template>
